package example.com.dagger2;

import android.app.Application;

import example.com.dagger2.common.AppModule;
import example.com.dagger2.common.BasicComponent;
import example.com.dagger2.common.DaggerBasicComponent;
import example.com.dagger2.common.LocalModule;
import example.com.dagger2.common.NetworkModule;

/**
 * Created by Asura on 2016/7/26.
 */
public class HeroApplication extends Application {

    private BasicComponent basicComponent;

    @Override
    public void onCreate() {
        super.onCreate();
//        AppComponent appComponent = DaggerAppComponent.builder().appModule(new AppModule(this)).build();
        basicComponent = DaggerBasicComponent.builder()
                .appModule(new AppModule(this))
                .localModule(new LocalModule())
                .networkModule(new NetworkModule())
                .build();
    }


    public BasicComponent getBasicComponent() {
        return basicComponent;
    }
}
